package com.hehe.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value="")
public class index {

    @Value("${config_file_name}")
    private String config_file_name;


    @GetMapping(value=""  )
    public String index(Model model){
        System.out.println("访问首页 index 啦 ~ !!!");
        System.out.println("访问首页 index 啦 ~ !!!");
        System.out.println("访问首页 index 啦 ~ !!!");
        return "index.html";
    }

    //    ResponseBody
    @GetMapping(value="/test"  )
    @ResponseBody
    public String ResponseBody_test(Model model){
        System.out.println("TEST---TEST----");
        System.out.println("TEST---TEST----");
        System.out.println("TEST---TEST----");
        return "ResponseBody --TEST ----测试测试测试-- no-SQL .....";
    }











}




